load("@rules_rust//rust:defs.bzl", "rust_library", "rust_test")

package(default_visibility = ["//visibility:public"])

DEV_DEPENDENCIES = [
    # Keep sorted.
    "//packages/ic-ed25519",
    "//packages/ic-ledger-hash-of",
    "//packages/ic-secp256k1",
    "//packages/icrc-ledger-types:icrc_ledger_types",
    "//rs/crypto/test_utils/reproducible_rng",
    "//rs/ledger_suite/common/ledger_core",
    "//rs/ledger_suite/icrc1",
    "//rs/rosetta-api/common/rosetta_core:rosetta-core",
    "//rs/types/types",
    "@crate_index//:candid",
    "@crate_index//:ic-agent",
    "@crate_index//:num-traits",
    "@crate_index//:proptest",
    "@crate_index//:rand",
    "@crate_index//:rand_chacha",
    "@crate_index//:serde_bytes",
    "@crate_index//:serde_json",
    "@crate_index//:strum",
]

MACRO_DEPENDENCIES = [
    # Keep sorted.
    "@crate_index//:strum_macros",
]

rust_library(
    name = "test_utils",
    testonly = True,
    srcs = glob(["src/**"]),
    crate_name = "ic_icrc1_test_utils",
    proc_macro_deps = MACRO_DEPENDENCIES,
    version = "0.8.0",
    deps = DEV_DEPENDENCIES,
)

rust_test(
    name = "icrc1_utils_unit_test",
    crate = ":test_utils",
    version = "0.9.0",
    deps = DEV_DEPENDENCIES,
)
